
<form nz-form #validateForm="ngForm" (ngSubmit)="submitForm()" nzLayout="horizontal" autocomplete="off">
    <!-- 模态框头部 -->
    <div class="modal-header">
        <div class="modal-title">
            <i class="iconfont icon-medicine-box mr-sm"></i>
            <span *ngIf="entity.id">{{l('Edit')}}</span>
            <span *ngIf="!entity.id">{{l('Create')}}</span>
        </div>
    </div>
    <!-- 模态框内容 -->
    <fieldset>
        <!-- 提示信息 -->
        <!-- <nz-alert nzType="info" nzCloseable [nzShowIcon]="true" nzMessage="l('我想提示点什么内容给你说')"></nz-alert> -->
                   <!-- CategoryId : CategoryId 的控件范围=Start= -->
                <nz-form-item nz-row>
                        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="categoryId">  
                            {{l('CategoryId')}}
                            </nz-form-label>
                    <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                        <!--  控件位置 -->
                                <nz-input-number
                                    name="categoryId" #categoryId="ngModel"
                                    [(ngModel)]="entity.categoryId"
                                    [nzMin]="0"
                                    [nzMax]="1000000"
                                    [nzStep]="1"
                                ></nz-input-number>


                    </nz-form-control>
             
                </nz-form-item>
                <!--CategoryId : CategoryId 的控件范围结束=END= -->
                   <!-- Title : Title 的控件范围=Start= -->
                <nz-form-item nz-row>
                        <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="title">
                            {{l('Title')}}
                        </nz-form-label>
                    <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                        <!--  控件位置 -->
                                <input nz-input name="title" #title="ngModel"
                                       [(ngModel)]="entity.title"
                                      [placeholder]="l('StockTitleInputDesc')"  required >

                                <!-- 校验 -->
                                <nz-form-explain *ngIf="title.control.dirty
                                                 &&title.control.errors">
                                                                        <ng-container *ngIf="title.control.hasError('required')">{{l('ThisFieldIsRequired')}}</ng-container>                                </nz-form-explain>

                    </nz-form-control>
             
                </nz-form-item>
                <!--Title : Title 的控件范围结束=END= -->
                   <!-- Type : Type 的控件范围=Start= -->
                <nz-form-item nz-row>
                        <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="type">
                            {{l('Type')}}
                        </nz-form-label>
                    <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                        <!--  控件位置 -->
                                <nz-input-number
                                    name="type" #type="ngModel"
                                    [(ngModel)]="entity.type"
                                    [nzMin]="0"
                                    [nzMax]="1000000"
                                    [nzStep]="1"
                                ></nz-input-number>

                                <!-- 校验 -->
                                <nz-form-explain *ngIf="type.control.dirty
                                                 &&type.control.errors">
                                                                        <ng-container *ngIf="type.control.hasError('required')">{{l('ThisFieldIsRequired')}}</ng-container>                                </nz-form-explain>

                    </nz-form-control>
             
                </nz-form-item>
                <!--Type : Type 的控件范围结束=END= -->
                   <!-- Score : Score 的控件范围=Start= -->
                <nz-form-item nz-row>
                        <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="score">
                            {{l('Score')}}
                        </nz-form-label>
                    <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                        <!--  控件位置 -->
                                <nz-input-number name="score" #score="ngModel"
                                                 [(ngModel)]="entity.score"
                                                 [nzMin]="0"
												 [nzMax]="1000000"
                                                 [nzStep]="0.1"
                                                 [nzPlaceHolder]="'Digital'"></nz-input-number>

                                <!-- 校验 -->
                                <nz-form-explain *ngIf="score.control.dirty
                                                 &&score.control.errors">
                                                                        <ng-container *ngIf="score.control.hasError('required')">{{l('ThisFieldIsRequired')}}</ng-container>                                </nz-form-explain>

                    </nz-form-control>
             
                </nz-form-item>
                <!--Score : Score 的控件范围结束=END= -->
                   <!-- Limit : Limit 的控件范围=Start= -->
                <nz-form-item nz-row>
                        <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="limit">
                            {{l('Limit')}}
                        </nz-form-label>
                    <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                        <!--  控件位置 -->
                                <nz-input-number
                                    name="limit" #limit="ngModel"
                                    [(ngModel)]="entity.limit"
                                    [nzMin]="0"
                                    [nzMax]="1000000"
                                    [nzStep]="1"
                                ></nz-input-number>

                                <!-- 校验 -->
                                <nz-form-explain *ngIf="limit.control.dirty
                                                 &&limit.control.errors">
                                                                        <ng-container *ngIf="limit.control.hasError('required')">{{l('ThisFieldIsRequired')}}</ng-container>                                </nz-form-explain>

                    </nz-form-control>
             
                </nz-form-item>
                <!--Limit : Limit 的控件范围结束=END= -->
                   <!-- Status : Status 的控件范围=Start= -->
                <nz-form-item nz-row>
                        <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="status">
                            {{l('Status')}}
                        </nz-form-label>
                    <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                        <!--  控件位置 -->
                                <nz-input-number
                                    name="status" #status="ngModel"
                                    [(ngModel)]="entity.status"
                                    [nzMin]="0"
                                    [nzMax]="1000000"
                                    [nzStep]="1"
                                ></nz-input-number>

                                <!-- 校验 -->
                                <nz-form-explain *ngIf="status.control.dirty
                                                 &&status.control.errors">
                                                                        <ng-container *ngIf="status.control.hasError('required')">{{l('ThisFieldIsRequired')}}</ng-container>                                </nz-form-explain>

                    </nz-form-control>
             
                </nz-form-item>
                <!--Status : Status 的控件范围结束=END= -->

    </fieldset>
    <!-- 模态框底部 -->
    <div class="modal-footer">
        <button nz-button [nzType]="'default'" type="button" (click)="close()" [disabled]="saving">
            <i class="iconfont icon-close-circle"></i> {{l("Cancel")}}
        </button>
        <button nz-button [nzType]="'primary'" type="submit" [disabled]="!validateForm.form.valid|| saving" [nzLoading]="saving">
            <i class="iconfont icon-save" *ngIf="!saving"></i> {{l("Save")}}
        </button>
    </div>
</form>